
import os
from flask import Blueprint, jsonify,request
from flask_cors import CORS
import json

from service.stockService import StockService
stock_controller = Blueprint('stock_controller', __name__)
CORS(stock_controller)

@stock_controller.route('/get_stock_list',methods=['POST'])
def getStockList()->None:
    return json.dumps([ob.__dict__ for ob in StockService().getStockList()])

@stock_controller.route('/get_compare_stock_list',methods=['POST'])
def getCompareStockList()->None:
    return json.dumps([ob.__dict__ for ob in StockService().getCompareStockList()])
